5.3.3 APPX Application Design Manual

+ Chapter 1-1: Overview of Application Design
+ Chapter 1-2: Getting Started
+ Chapter 1-3: Data Dictionary
+ Chapter 1-4: Understanding Process Design
+ Chapter 1-5: Interprocess Communication
+ Chapter 1-6: Customizing Your Application
+ Chapter 1-7: The Documentation Facility
+ Chapter 1-8: Application Design Tools
+ Chapter 2-1: Data Dictionary Overview
+ Chapter 2-2: Data Dictionary Concepts
+ Chapter 2-3: Domains
+ Chapter 2-4: Files and Fields
+ Chapter 2-5: Work Fields
+ Chapter 3-1: Overview of APPX Processes
+ Chapter 3-2: Getting Started
+ Chapter 3-3: Process Definition
+ Chapter 3-4: Menu Processes
+ Chapter 3-5: Job Processes
+ Chapter 3-6: Input Processes
+ Chapter 3-7: Output Processes
+ Chapter 3-8: Update Processes
+ Chapter 3-9: Query Processes
+ Chapter 3-10: Inquiry Processes
+ Chapter 3-11: Status Processes
+ Chapter 3-12: Subroutine Processes
+ Chapter 3-13: Table Processes
+ Chapter 3-14: Automatic and Optional Children
+ Chapter 3-15: Using the Image Editor
+ Chapter 3-16: Using GUI Features of the Image Editor
+ Chapter 3-17: Using Event Points
+ Chapter 4-1: ILF Integration
+ Chapter 4-2: True/False Status Indicators
+ Chapter 4-3: Specifying Statements
+ Chapter 4-4: The ILF Editor
+ Chapter 4-5: The Appx ILF Debugger
- Chapter 4-6: ILF Keyword Reference
+ Chapter 4-7: Predefined Fields
+ Chapter 4-8: Runtime Subroutine's and Predefined Processes
+ Chapter 4-9: Appx Chart Director API

Chapter 4-6: ILF Keyword Reference

STORE


The STORE statement saves the contents of a field or record in the area assigned as the store area for the field or record. These contents can later be restored into the field or record with the RESTORE statement.

  ?????   STORE    ??? ?????????????????????? ??? ??????????????
  (1)              (2) (3)                    (4) (5)

(1) T/F execution conditions
(2) Application ID
(3) File name, field name, or predefined field
(4) Occurrence (constant/index)
(5) Data item type (RECORD, FIELD, DEFAULT RECORD, DEFAULT FIELD)

Using the Statement

The STORE statement allows the designer to store the values in a field or record so that temporary use of the field or record for accessing other data records or some other processing does not cause the contents of the field or record to be lost permanently.

The data item type specification can specify FIELD, RECORD, DEFAULT FIELD, or DEFAULT RECORD. If the FIELD or DEFAULT FIELD option is specified, the data item to be saved must be a field in the data dictionary. If the RECORD or DEFAULT RECORD option is specified, the data item to be saved must be specified as a file name. In this case, the current contents of the file?s record area are saved. The occurrence number has no meaning for the STORE statement with the RECORD option.

Fields that are part of a record do not have an independent store or default area. All fields that are part of a record are saved in their proper location in the area assigned for storing the record. Therefore, it is possible to store an entire record and then restore specific fields, or to store only some fields and then restore the entire record. A field or record can be stored any number of times, and it can also be restored any number of times, independently. These statements only cause the contents of the specified field or record to be stored in, or restored from, the store or default area assigned to the field or record. The store area and default area are allocated if a STORE or RESTORE statement is present. They are initialized to the default value; therefore, a RESTORE statement can be executed even if no STORE statement exists for the field or record.

No editing or justification is performed. All data is copied unchanged, and a subsequent RESTORE statement restores the contents of a field or record to the state it was in when the most recent STORE statement was executed.

You can alter the default values of a field or record by using the STORE statement to move current field or record values into the DEFAULT FIELD or DEFAULT RECORD area.

Restrictions

If the FIELD or DEFAULT FIELD option is specified, the data item to be saved must be a field in the data dictionary. If the RECORD or DEFAULT RECORD option is specified, the data item to be saved must be specified as a file name. The occurrence number has no meaning for the STORE statement with the RECORD option.

Because fields that are part of a record do not have a separate store or default area assigned to them, storing a record causes any previously saved contents of fields that are part of that record to be lost. Executing a STORE statement for a field that is part of a record after the record is saved with a STORE statement causes the stored record to be modified.

The contents of predefined fields can also be saved using the STORE statement. Therefore, it is invalid to use the STORE statement for predefined fields that are non-modifiable, since the RESTORE command is invalid for those fields.

Related Statements

RESTORE

Example

In the following example, the amount field RECEIPT2 CHECK AMOUNT is saved, presumably because its contents may be affected during the processing of unpaid invoices. After invoice processing is completed, the field is restored. 

          STORE   TAR RECEIPT2 CHECK AMOUNT       FIELD
          SET  TAR WORK COUNT APPLY TO            =     0
          BEG AT   TAR UNPAID              IN TAR RECEIPT2 CUSTOMER NO
          END AT   TAR UNPAID              IN TAR RECEIPT2 CUSTOMER NO
          BEG READ TAR UNPAID    HOLD 0 KEY IS  UNPAID ALTERNATE KEY
          *   (process unpaid invoices
          END READ TAR UNPAID
          RESTORE  TAR RECEIPT2 CHECK AMOUNT  FIELD

Application Design Manual                                         "Powered by Appx Software"

703

©2006 By APPX Software, Inc. All Rights Reserved